package com.example.demo.service.impl;

import com.example.demo.service.ByteEchoPeerOne;
import com.example.demo.service.InitService;
import org.springframework.beans.factory.DisposableBean;
import org.springframework.stereotype.Service;


/**
 * create by lorne on 2018/3/13
 */
@Service
public class InitServiceImpl implements InitService,DisposableBean {


    @Override
    public void start() {
        try {
            ByteEchoPeerOne.main(null);
        } catch (Exception e) {
            e.printStackTrace();
        }

    }

    @Override
    public void close() {

    }

    @Override
    public void destroy() throws Exception {
        close();
    }
}
